/**
 * FileName: User
 * Author: TangZaoBang
 * Date: 2023/04/29 16:18
 * Description:
 * <p>
 * History:
 * <author> TangZaoBang
 * <time> 2023/04/29 16:18
 * <version> 1.0.0
 * <desc> 版本描述
 */

package com.bosssoft.quickstart.demo.dao.entity;

import com.bosssoft.quickstart.demo.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;


/**
 * @Class User
 * @Description User
 * @Author TangZaoBang
 * @Date 2023/04/29 16:18
 * @Version
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "basic_user")
public class User extends BaseEntity {
    /**
     *  id 雪花算法生成对应行的记录id
     *  这个是主键定义要备注@id 否则 deleteByPrimaryKey不认为他的主键
     */
    @NotNull(message = "记录id不能为空")
    @Id
    private Long id;
    /**
     *  姓名
     */
    @NotBlank(message = "姓名不能为空")
    private String name;
    /**
     *  身份证id
     */
    @NotBlank(message = "身份证id不能为空")
    private String citizenId;
    /**
     *  生日
     */
    @ApiModelProperty("生日")
    private LocalDate birthday;
}